<template>
  <div :id="vueEchart" style="width: 560px; height: 400px"></div>
</template>

<script>
import { v4 } from 'uuid'
import echarts from 'echarts'
export default {
    prop=['option'],
    data(){
        return{
            vueEchart:''
        }
    },
    mounted(){
        this.vueEchart = v4()
        console.log(this.vueEchart);
        this.initEchart()
    },
    methods:{
        initEchart(){
            this.$nextTick(()=>{
                var myechart = echarts.init(document.getElementById(this.vueEchart))
                myechart.setOption(this.option)
            })
            
        }
    }
}
</script>

<style>

</style>